window.onload = function () {
  chrome.storage.local.get("temp", function ({ temp }) {
    if (temp) {
      document.getElementById("alarm_temp").value = temp;
    }
  });

  document.getElementById("confirmbtn").addEventListener("click", function () {
    var temp = document.getElementById("alarm_temp")?.value;
    if (temp) {
      chrome.storage.local.set({ temp: temp }, function () {
        console.log("保存天气成功");
      });
    }
  });
};
